/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package patternmining.model.graph;

import edu.uci.ics.jung.graph.DirectedSparseMultigraph;

/**
 *
 * @author Holger
 */
public class JungImplementation implements GraphImplementation{
    
    private DirectedSparseMultigraph<Vertex, Edge> graph;
    
    public JungImplementation(){
        graph = new DirectedSparseMultigraph<Vertex, Edge>();
    }

    public String toString(){
        return graph.toString();
    }

    public void add(Vertex vertex){
        graph.addVertex(vertex);
    }

    public void add(Edge edge){
        graph.addEdge(edge, edge.getOrigin(), edge.getDestination());
    }

}
